home *** CD-ROM | disk | FTP | other *** search
/ Java Programmer's Toolkit / Java Programmer's Toolkit.iso / gs3.53 / waterfal.ps < prev    next >
Text File  |  1996-01-10  |  3KB  |  75 lines

  1. %    Copyright (C) 1992, 1993 Aladdin Enterprises.  All rights reserved.
  2. % This file is part of Aladdin Ghostscript.
  3. % Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  4. % or distributor accepts any responsibility for the consequences of using it,
  5. % or for whether it serves any particular purpose or works at all, unless he
  6. % or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  7. % License (the "License") for full details.
  8. % Every copy of Aladdin Ghostscript must include a copy of the License,
  9. % normally in a plain ASCII text file named PUBLIC.  The License grants you
  10. % the right to copy, modify and redistribute Aladdin Ghostscript, but only
  11. % under certain conditions described in the License.  Among other things, the
  12. % License requires that the copyright notice and this notice be preserved on
  13. % all copies.
  14.  
  15. % waterfal.ps
  16. % This file produces a 'waterfall' printout of fonts at various sizes.
  17.  
  18.  
  19. % Specify any desired set of up to 3 fonts here.
  20. /Fonts [/Courier /Helvetica] def
  21.  
  22. % Specify any desired set of point sizes here.
  23. % The sum of the sizes should not exceed (roughly) 100.
  24. % For sizes larger than about 16, some characters may fall off the page.
  25. /Sizes [6 7 8 9 10 11 12 14 16] def
  26.  
  27. /eol
  28.  { currentfont /FontBBox get aload pop
  29.    exch pop sub exch pop 0 exch
  30.     % Many Ghostscript fonts have incorrect FontBBoxes....
  31.     pop -1000
  32.    1.15 mul currentfont /FontMatrix get dtransform
  33.    translate
  34.    0 0 moveto
  35.  } def
  36.  
  37. (landscap.ps) run
  38. clippath pathbbox newpath
  39. /ury exch def /urx exch def /lly exch def /llx exch def
  40. llx 18 add ury 18 sub translate
  41. % Read the current Y resolution without using Ghostscript-specific operators.
  42. gsave initmatrix 0 72 dtransform abs exch abs exch .max grestore
  43. round cvi /dpi exch def
  44. QUIET not
  45.  { (Creating waterfall printout at ) print dpi =only ( DPI.\n) print flush
  46.  }
  47. if
  48.  
  49. newpath 0 setgray
  50. /Courier findfont 20 scalefont setfont
  51.  
  52. Fonts
  53.  { save exch
  54.    findfont /basefont exch def
  55.    basefont 20 scalefont setfont eol
  56.    basefont /FontName get =string cvs show
  57.    ( ) show dpi =string cvs show ( DPI) show
  58.    Sizes
  59.     { dup /size exch def basefont exch scalefont setfont eol
  60.       size =string cvs show ( ) show
  61.       (qwertyuiop-asdfghjkl_zxcvbnm ) show
  62.       (QWERTYUIOP+ASDFGHJKL/ZXCVBNM ) show
  63.       (1470258369 .,:;?!) show
  64.     } forall
  65.    matrix currentmatrix aload pop
  66.    7 -1 roll restore
  67.    6 array astore setmatrix
  68.  } forall
  69.  
  70. showpage
  71. quit
  72.